class_name AnimatedButtonProperty_Scale
extends AnimatedButtonProperty

#region 属性
@export var target_scale:Vector2
#endregion
#region 字段
#endregion
#region 信号
#endregion

#region 基类方法
func add_tween(btn:AnimatedButton,tween:Tween):
	super(btn,tween)
	var init_scale = btn.get_or_add_init_property("scale",btn.scale)
	var t:PropertyTweener = tween.tween_property(btn,"scale",target_scale,duration * absf((target_scale.x - btn.scale.x)/(target_scale.x - init_scale.x)))
	t.set_trans(transition)
	t.set_ease(easing)
	if as_relative:
		t.as_relative()
	if delay > 0:
		t.set_delay(delay)
func add_resume_tween(btn:AnimatedButton,resume_tween:Tween):
	super(btn,resume_tween)
	var init_scale = btn.get_or_add_init_property("scale",btn.scale)
	var rt:PropertyTweener = resume_tween.tween_property(btn,"scale",init_scale,resume_duration * absf((init_scale.x - btn.scale.x)/(target_scale.x - init_scale.x)))
	rt.set_trans(resume_transition)
	rt.set_ease(resume_easing)
	if resume_as_relative:
		rt.as_relative()
	if resume_delay > 0:
		rt.set_delay(resume_delay)
#endregion
#region 公共方法
#endregion
#region 私有方法
#endregion
#region 生命周期函数
#endregion
